﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace chesslibrary.cs
{
    public abstract class move_pieces
    {
        private bool check;
		private bool checkmate;
		private bool stalemate;
		private color_pieces owner;
		private cell_chess begin;
		private cell_chess end;
        protected pieces_chess piece;
		protected pieces_chess capturedpiece;
        internal move_pieces(properties_cell begin,properties_cell end,color_pieces owner)
		{
			this.begin=new cell_chess(begin);
			this.end=new cell_chess(end);
			this.owner=owner;
			piece=begin.pieces_chess;
            capturedpiece=end.pieces_chess;
		}
        public pieces_chess pieces_chess
		{
			get{return piece;}
		}
        public pieces_chess Capturedpiece
		{
			get{return capturedpiece;}
		}
        public cell_chess End
		{
			get{return end;}
		}
		public cell_chess Begin
		{
			get{return begin;}
		}
        public color_pieces Owner
		{
			get{return owner;}
		}
        public bool IsCapture()
		{
			return !(capturedpiece==null);
		}
		internal void Check()
		{
			check=true;
		}
        public void Checkmate()
        {
            checkmate = true;
        }
        public void Stalemate()
        {
            stalemate = true;
        }
    }
}
